﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Model.Models.ClienteModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Cadastrar cliente</h2>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/DropDownCascades.js") %>" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery.simple-dtpicker.js"></script>
    <script src="../../Scripts/CustomValidation.js" type="text/javascript"></script>



<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Cliente</legend>

    <table border="0">
        <tr>
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Nome ) %><br/>
                <%: Html.EditorFor(model => model.Nome)%><br/>
                <%: Html.ValidationMessageFor(model => model.Nome) %>
            </td>
            
            <td height="70"  width="70%">
                <%: Html.LabelFor(model => model.Rua) %><br/>
                <%: Html.EditorFor(model => model.Rua) %><br/>
                <%: Html.ValidationMessageFor(model => model.Rua) %>    
            </td>
        </tr>

        <tr>
            <td height="70"  width="70%">
                <%: Html.LabelFor(model => model.Cpf) %><br/>
                <%: Html.EditorFor(model => model.Cpf) %><br/>
                <%: Html.ValidationMessageFor(model => model.Cpf) %>
            </td>
            
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Numero) %><br/>
                <%: Html.EditorFor(model => model.Numero) %><br/>
                <%: Html.ValidationMessageFor(model => model.Numero) %>
            </td>
        </tr>
     
        <tr>
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Email) %><br/>
                <%: Html.EditorFor(model => model.Email) %><br/>
                <%: Html.ValidationMessageFor(model => model.Email) %>    
            </td>
            
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Bairro) %><br/>
                <%: Html.EditorFor(model => model.Bairro) %><br/>
                <%: Html.ValidationMessageFor(model => model.Bairro) %>
            </td>
        </tr>
     
        <tr>
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Telefone) %><br/>
                <%: Html.EditorFor(model => model.Telefone) %><br/>
                <%: Html.ValidationMessageFor(model => model.Telefone) %>
            </td>
            
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Cep) %><br/>
                <%: Html.EditorFor(model => model.Cep) %><br/>
                <%: Html.ValidationMessageFor(model => model.Cep) %>
            </td>
        </tr>
     
        <tr>
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Senha) %><br/>
                <%: Html.PasswordFor(model => model.Senha) %><br/>
                <%: Html.ValidationMessageFor(model => model.Senha) %>
            </td>
            
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Id_estado) %><br/>        
                <%: Html.DropDownListFor(model => model.Id_estado, ViewBag.Id_Setor as SelectList, new { id = "Estado" })%>
                <%: Html.ValidationMessageFor(model => model.Id_estado)%>
            </td>
        </tr>
        <tr>
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.ConfirmaSenha) %><br/>
                <%: Html.PasswordFor(model => model.ConfirmaSenha)%><br/>
                <%: Html.ValidationMessageFor(model => model.ConfirmaSenha) %>
            </td>
            
            <td height="70" width="70%">
                <%: Html.LabelFor(model => model.Id_cidade) %><br/>      
                <select id="Cidade" name="Id_cidade"></select>
                <%: Html.ValidationMessageFor(model => model.Id_cidade)%>
        </td>
        </tr>
</table> 
    </fieldset>
    <p>
        </p>
            <input type="submit" value="Cadastrar" class="button dark" />
            <input type="button" value="Voltar" class="button dark" onclick="location.href='<%: Url.Action("ListarEmpresas", "Cliente") %>'" />
<% } %>
</asp:Content>
